import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
import store from './store'
import 'swiper/css';
import '@/assets/reset.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import * as echarts from 'echarts'
import china from 'echarts/map/json/china.json' //导入china包
echarts.registerMap('china', china)

import './assets/iconfont/iconfont.css';

const app = createApp(App)

app.use(createPinia()).use(router).use(ElementPlus).use(store)

// 将 echarts 添加到全局属性中
app.config.globalProperties.$echarts = echarts
// 自动将 Element Plus 中的所有图标组件注册为全局组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.mount('#app')

